# -*- makefile -*-
# Copyright (c) 2006-2020 Cisco Systems, Inc.  All rights reserved.
# Copyright (c) 2008      Sun Microsystems, Inc.  All rights reserved.
# Copyright (c) 2012-2013 Los Alamos National Security, LLC.  All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

include $(top_srcdir)/Makefile.ompi-rules

# For simplicity of maintenance over time, we are in the slow process
# of converting all existing nroff pages to Markdown.  As man pages
# are converted to Markdown, move them from TEMPLATE_FILES to
# MD_ILES.
#
# Just in case someone looks for it here someday, here is a
# conveninent reference for what Markdown pandoc supports:
#
# https://rmarkdown.rstudio.com/authoring_pandoc_markdown.html

MD_FILES = \
        MPI_T_init_thread.3.md

TEMPLATE_FILES = \
        MPI_Abort.3in \
        MPI_Accumulate.3in \
        MPI_Add_error_class.3in \
        MPI_Add_error_code.3in \
        MPI_Add_error_string.3in \
        MPI_Address.3in \
	MPI_Aint_add.3in \
	MPI_Aint_diff.3in \
        MPI_Allgather.3in \
        MPI_Iallgather.3in \
        MPI_Allgatherv.3in \
        MPI_Iallgatherv.3in \
        MPI_Alloc_mem.3in \
        MPI_Allreduce.3in \
        MPI_Iallreduce.3in \
        MPI_Alltoall.3in \
        MPI_Ialltoall.3in \
        MPI_Alltoallv.3in \
        MPI_Ialltoallv.3in \
        MPI_Alltoallw.3in \
        MPI_Ialltoallw.3in \
        MPI_Attr_delete.3in \
        MPI_Attr_get.3in \
        MPI_Attr_put.3in \
        MPI_Barrier.3in \
        MPI_Ibarrier.3in \
        MPI_Bcast.3in \
        MPI_Ibcast.3in \
        MPI_Bsend.3in \
        MPI_Bsend_init.3in \
        MPI_Buffer_attach.3in \
        MPI_Buffer_detach.3in \
        MPI_Cancel.3in \
        MPI_Cart_coords.3in \
        MPI_Cart_create.3in \
        MPI_Cartdim_get.3in \
        MPI_Cart_get.3in \
        MPI_Cart_map.3in \
        MPI_Cart_rank.3in \
        MPI_Cart_shift.3in \
        MPI_Cart_sub.3in \
        MPI_Close_port.3in \
        MPI_Comm_accept.3in \
        MPI_Comm_c2f.3in \
        MPI_Comm_call_errhandler.3in \
        MPI_Comm_compare.3in \
        MPI_Comm_connect.3in \
        MPI_Comm_create.3in \
        MPI_Comm_create_group.3in \
        MPI_Comm_create_errhandler.3in \
        MPI_Comm_create_keyval.3in \
        MPI_Comm_delete_attr.3in \
        MPI_Comm_disconnect.3in \
        MPI_Comm_dup.3in \
        MPI_Comm_dup_with_info.3in \
        MPI_Comm_idup.3in \
        MPI_Comm_f2c.3in \
        MPI_Comm_free.3in \
        MPI_Comm_free_keyval.3in \
        MPI_Comm_get_attr.3in \
        MPI_Comm_get_errhandler.3in \
        MPI_Comm_get_info.3in \
        MPI_Comm_get_name.3in \
        MPI_Comm_get_parent.3in \
        MPI_Comm_group.3in \
        MPI_Comm_join.3in \
        MPI_Comm_rank.3in \
        MPI_Comm_remote_group.3in \
        MPI_Comm_remote_size.3in \
        MPI_Comm_set_attr.3in \
        MPI_Comm_set_errhandler.3in \
        MPI_Comm_set_info.3in \
        MPI_Comm_set_name.3in \
        MPI_Comm_size.3in \
        MPI_Comm_spawn.3in \
        MPI_Comm_spawn_multiple.3in \
        MPI_Comm_split.3in \
        MPI_Comm_split_type.3in \
        MPI_Comm_test_inter.3in \
        MPI_Compare_and_swap.3in \
        MPI_Dims_create.3in \
        MPI_Dist_graph_create.3in \
        MPI_Dist_graph_create_adjacent.3in \
        MPI_Dist_graph_neighbors.3in \
        MPI_Dist_graph_neighbors_count.3in \
        MPI_Errhandler_create.3in \
        MPI_Errhandler_free.3in \
        MPI_Errhandler_get.3in \
        MPI_Errhandler_set.3in \
        MPI_Error_class.3in \
        MPI_Error_string.3in \
        MPI_Exscan.3in \
        MPI_Iexscan.3in \
        MPI_Fetch_and_op.3in \
        MPI_File_c2f.3in \
        MPI_File_call_errhandler.3in \
        MPI_File_close.3in \
        MPI_File_create_errhandler.3in \
        MPI_File_delete.3in \
        MPI_File_f2c.3in \
        MPI_File_get_amode.3in \
        MPI_File_get_atomicity.3in \
        MPI_File_get_byte_offset.3in \
        MPI_File_get_errhandler.3in \
        MPI_File_get_group.3in \
        MPI_File_get_info.3in \
        MPI_File_get_position.3in \
        MPI_File_get_position_shared.3in \
        MPI_File_get_size.3in \
        MPI_File_get_type_extent.3in \
        MPI_File_get_view.3in \
        MPI_File_iread.3in \
        MPI_File_iread_at.3in \
        MPI_File_iread_all.3in \
        MPI_File_iread_at_all.3in \
        MPI_File_iread_shared.3in \
        MPI_File_iwrite.3in \
        MPI_File_iwrite_at.3in \
        MPI_File_iwrite_all.3in \
        MPI_File_iwrite_at_all.3in \
        MPI_File_iwrite_shared.3in \
        MPI_File_open.3in \
        MPI_File_preallocate.3in \
        MPI_File_read.3in \
        MPI_File_read_all.3in \
        MPI_File_read_all_begin.3in \
        MPI_File_read_all_end.3in \
        MPI_File_read_at.3in \
        MPI_File_read_at_all.3in \
        MPI_File_read_at_all_begin.3in \
        MPI_File_read_at_all_end.3in \
        MPI_File_read_ordered.3in \
        MPI_File_read_ordered_begin.3in \
        MPI_File_read_ordered_end.3in \
        MPI_File_read_shared.3in \
        MPI_File_seek.3in \
        MPI_File_seek_shared.3in \
        MPI_File_set_atomicity.3in \
        MPI_File_set_errhandler.3in \
        MPI_File_set_info.3in \
        MPI_File_set_size.3in \
        MPI_File_set_view.3in \
        MPI_File_sync.3in \
        MPI_File_write.3in \
        MPI_File_write_all.3in \
        MPI_File_write_all_begin.3in \
        MPI_File_write_all_end.3in \
        MPI_File_write_at.3in \
        MPI_File_write_at_all.3in \
        MPI_File_write_at_all_begin.3in \
        MPI_File_write_at_all_end.3in \
        MPI_File_write_ordered.3in \
        MPI_File_write_ordered_begin.3in \
        MPI_File_write_ordered_end.3in \
        MPI_File_write_shared.3in \
        MPI_Finalize.3in \
        MPI_Finalized.3in \
        MPI_Free_mem.3in \
        MPI_Gather.3in \
        MPI_Igather.3in \
        MPI_Gatherv.3in \
        MPI_Igatherv.3in \
        MPI_Get.3in \
        MPI_Get_accumulate.3in \
        MPI_Get_address.3in \
        MPI_Get_count.3in \
        MPI_Get_elements.3in \
        MPI_Get_elements_x.3in \
        MPI_Get_library_version.3in \
        MPI_Get_processor_name.3in \
        MPI_Get_version.3in \
        MPI_Graph_create.3in \
        MPI_Graphdims_get.3in \
        MPI_Graph_get.3in \
        MPI_Graph_map.3in \
        MPI_Graph_neighbors.3in \
        MPI_Graph_neighbors_count.3in \
        MPI_Grequest_complete.3in \
        MPI_Grequest_start.3in \
        MPI_Group_c2f.3in \
        MPI_Group_compare.3in \
        MPI_Group_difference.3in \
        MPI_Group_excl.3in \
        MPI_Group_f2c.3in \
        MPI_Group_free.3in \
        MPI_Group_incl.3in \
        MPI_Group_intersection.3in \
        MPI_Group_range_excl.3in \
        MPI_Group_range_incl.3in \
        MPI_Group_rank.3in \
        MPI_Group_size.3in \
        MPI_Group_translate_ranks.3in \
        MPI_Group_union.3in \
        MPI_Ibsend.3in \
        MPI_Improbe.3in \
        MPI_Imrecv.3in \
        MPI_Info_c2f.3in \
        MPI_Info_create.3in \
        MPI_Info_delete.3in \
        MPI_Info_dup.3in \
        MPI_Info_env.3in \
        MPI_Info_f2c.3in \
        MPI_Info_free.3in \
        MPI_Info_get.3in \
        MPI_Info_get_nkeys.3in \
        MPI_Info_get_nthkey.3in \
        MPI_Info_get_valuelen.3in \
        MPI_Info_set.3in \
        MPI_Init.3in \
        MPI_Initialized.3in \
        MPI_Init_thread.3in \
        MPI_Intercomm_create.3in \
        MPI_Intercomm_merge.3in \
        MPI_Iprobe.3in \
        MPI_Irecv.3in \
        MPI_Irsend.3in \
        MPI_Isend.3in \
        MPI_Issend.3in \
        MPI_Is_thread_main.3in \
        MPI_Keyval_create.3in \
        MPI_Keyval_free.3in \
        MPI_Lookup_name.3in \
        MPI_Message_c2f.3in \
        MPI_Message_f2c.3in \
        MPI_Mprobe.3in \
        MPI_Mrecv.3in \
        MPI_Neighbor_allgather.3in \
        MPI_Ineighbor_allgather.3in \
        MPI_Neighbor_allgatherv.3in \
        MPI_Ineighbor_allgatherv.3in \
        MPI_Neighbor_alltoall.3in \
        MPI_Ineighbor_alltoall.3in \
        MPI_Neighbor_alltoallv.3in \
        MPI_Ineighbor_alltoallv.3in \
        MPI_Neighbor_alltoallw.3in \
        MPI_Ineighbor_alltoallw.3in \
        MPI_Op_c2f.3in \
        MPI_Op_commutative.3in \
        MPI_Op_create.3in \
        MPI_Open_port.3in \
        MPI_Op_f2c.3in \
        MPI_Op_free.3in \
        MPI_Pack.3in \
        MPI_Pack_external.3in \
        MPI_Pack_external_size.3in \
        MPI_Pack_size.3in \
        MPI_Pcontrol.3in \
        MPI_Probe.3in \
        MPI_Publish_name.3in \
        MPI_Put.3in \
        MPI_Query_thread.3in \
        MPI_Raccumulate.3in \
        MPI_Recv.3in \
        MPI_Recv_init.3in \
        MPI_Reduce.3in \
        MPI_Ireduce.3in \
        MPI_Reduce_local.3in \
        MPI_Reduce_scatter.3in \
        MPI_Ireduce_scatter.3in \
        MPI_Reduce_scatter_block.3in \
        MPI_Ireduce_scatter_block.3in \
        MPI_Register_datarep.3in \
        MPI_Request_c2f.3in \
        MPI_Request_f2c.3in \
        MPI_Request_free.3in \
        MPI_Request_get_status.3in \
        MPI_Rget.3in \
        MPI_Rget_accumulate.3in \
        MPI_Rput.3in \
        MPI_Rsend.3in \
        MPI_Rsend_init.3in \
        MPI_Scan.3in \
        MPI_Iscan.3in \
        MPI_Scatter.3in \
        MPI_Iscatter.3in \
        MPI_Scatterv.3in \
        MPI_Iscatterv.3in \
        MPI_Send.3in \
        MPI_Send_init.3in \
        MPI_Sendrecv.3in \
        MPI_Sendrecv_replace.3in \
        MPI_Sizeof.3in \
        MPI_Ssend.3in \
        MPI_Ssend_init.3in \
        MPI_Start.3in \
        MPI_Startall.3in \
        MPI_Status_c2f.3in \
        MPI_Status_f2c.3in \
        MPI_Status_set_cancelled.3in \
        MPI_Status_set_elements.3in \
        MPI_Status_set_elements_x.3in \
        MPI_T_category_changed.3in \
        MPI_T_category_get_categories.3in \
        MPI_T_category_get_cvars.3in \
        MPI_T_category_get_info.3in \
        MPI_T_category_get_num.3in \
        MPI_T_category_get_pvars.3in \
        MPI_T_cvar_get_info.3in \
        MPI_T_cvar_get_num.3in \
        MPI_T_cvar_handle_alloc.3in \
        MPI_T_cvar_handle_free.3in \
        MPI_T_cvar_read.3in \
        MPI_T_cvar_write.3in \
        MPI_T_enum_get_info.3in \
        MPI_T_enum_get_item.3in \
        MPI_T_finalize.3in \
        MPI_T_pvar_get_info.3in \
        MPI_T_pvar_get_num.3in \
        MPI_T_pvar_handle_alloc.3in \
        MPI_T_pvar_handle_free.3in \
        MPI_T_pvar_read.3in \
        MPI_T_pvar_readreset.3in \
        MPI_T_pvar_reset.3in \
        MPI_T_pvar_session_create.3in \
        MPI_T_pvar_session_free.3in \
        MPI_T_pvar_start.3in \
        MPI_T_pvar_stop.3in \
        MPI_T_pvar_write.3in \
        MPI_Test.3in \
        MPI_Testall.3in \
        MPI_Testany.3in \
        MPI_Test_cancelled.3in \
        MPI_Testsome.3in \
        MPI_Topo_test.3in \
        MPI_Type_c2f.3in \
        MPI_Type_commit.3in \
        MPI_Type_contiguous.3in \
        MPI_Type_create_darray.3in \
        MPI_Type_create_f90_complex.3in \
        MPI_Type_create_f90_integer.3in \
        MPI_Type_create_f90_real.3in \
        MPI_Type_create_hindexed.3in \
        MPI_Type_create_hindexed_block.3in \
        MPI_Type_create_hvector.3in \
        MPI_Type_create_indexed_block.3in \
        MPI_Type_create_keyval.3in \
        MPI_Type_create_resized.3in \
        MPI_Type_create_struct.3in \
        MPI_Type_create_subarray.3in \
        MPI_Type_delete_attr.3in \
        MPI_Type_dup.3in \
        MPI_Type_extent.3in \
        MPI_Type_f2c.3in \
        MPI_Type_free.3in \
        MPI_Type_free_keyval.3in \
        MPI_Type_get_attr.3in \
        MPI_Type_get_contents.3in \
        MPI_Type_get_envelope.3in \
        MPI_Type_get_extent.3in \
        MPI_Type_get_extent_x.3in \
        MPI_Type_get_name.3in \
        MPI_Type_get_true_extent.3in \
        MPI_Type_get_true_extent_x.3in \
        MPI_Type_hindexed.3in \
        MPI_Type_hvector.3in \
        MPI_Type_indexed.3in \
        MPI_Type_lb.3in \
        MPI_Type_match_size.3in \
        MPI_Type_set_attr.3in \
        MPI_Type_set_name.3in \
        MPI_Type_size.3in \
        MPI_Type_size_x.3in \
        MPI_Type_struct.3in \
        MPI_Type_ub.3in \
        MPI_Type_vector.3in \
        MPI_Unpack.3in \
        MPI_Unpack_external.3in \
        MPI_Unpublish_name.3in \
        MPI_Wait.3in \
        MPI_Waitall.3in \
        MPI_Waitany.3in \
        MPI_Waitsome.3in \
        MPI_Win_allocate.3in \
        MPI_Win_allocate_shared.3in \
        MPI_Win_attach.3in \
        MPI_Win_c2f.3in \
        MPI_Win_call_errhandler.3in \
        MPI_Win_complete.3in \
        MPI_Win_create.3in \
        MPI_Win_create_dynamic.3in \
        MPI_Win_create_errhandler.3in \
        MPI_Win_create_keyval.3in \
        MPI_Win_delete_attr.3in \
        MPI_Win_detach.3in \
        MPI_Win_f2c.3in \
        MPI_Win_fence.3in \
        MPI_Win_flush.3in \
        MPI_Win_flush_all.3in \
        MPI_Win_flush_local.3in \
        MPI_Win_flush_local_all.3in \
        MPI_Win_free.3in \
        MPI_Win_free_keyval.3in \
        MPI_Win_get_attr.3in \
        MPI_Win_get_errhandler.3in \
        MPI_Win_get_group.3in \
        MPI_Win_get_info.3in \
        MPI_Win_get_name.3in \
        MPI_Win_lock.3in \
        MPI_Win_lock_all.3in \
        MPI_Win_post.3in \
        MPI_Win_set_attr.3in \
        MPI_Win_set_errhandler.3in \
        MPI_Win_set_info.3in \
        MPI_Win_set_name.3in \
        MPI_Win_shared_query.3in \
        MPI_Win_start.3in \
        MPI_Win_sync.3in \
        MPI_Win_test.3in \
        MPI_Win_unlock.3in \
        MPI_Win_unlock_all.3in \
        MPI_Win_wait.3in \
        MPI_Wtick.3in \
        MPI_Wtime.3in

man_pages_from_md = $(MD_FILES:.3.md=.3)
man_pages_from_template = $(TEMPLATE_FILES:.3in=.3)

if OPAL_ENABLE_MAN_PAGES
man_MANS = $(man_pages_from_md) $(man_pages_from_template)
MAINTAINERCLEANFILES = $(man_pages_from_md)
endif

EXTRA_DIST = \
        $(MD_FILES) $(man_pages_from_md) \
        $(TEMPLATE_FILES) $(man_pages_from_template)
